package com.vipshop.compass.dao;

import java.util.List;

import org.hibernate.Query;
import org.springframework.stereotype.Repository;

import com.vipshop.compass.common.GenericDaoHibernate;
import com.vipshop.compass.domain.Demo;

@Repository("demoDao")
public class DemoDao extends GenericDaoHibernate<Demo, Integer> {

	public DemoDao(Class<Demo> persistentClass) {
		super(persistentClass);
	}

	public DemoDao() {
		super(Demo.class);
	}

	public List<Demo> getDuals() {
		Query qry = getSession().createQuery("from Demo");
		return qry.list();
	}

}
